// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /collection/addCollection */
export async function addCollection(
  body: MediaService.CollectionAddQuery,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultBizCollection>(`/media/collection/addCollection`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /collection/deleteCollection */
export async function deleteCollection(body: number, options?: { [key: string]: any }) {
  return request<MediaService.ResultBizCollection>(`/media/collection/deleteCollection`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /collection/getCollectionList */
export async function getCollectionList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getCollectionListParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.PageResultBizCollection>(`/media/collection/getCollectionList`, {
    method: 'GET',
    params: {
      ...params,
      query: undefined,
      ...params['query'],
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /collection/getCollectionsByUserId */
export async function getCollectionsByUserId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getCollectionsByUserIdParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.PageResultBizCollection>(`/media/collection/getCollectionsByUserId`, {
    method: 'GET',
    params: {
      ...params,
      query: undefined,
      ...params['query'],
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /collection/getCollectionWorksDetail */
export async function getCollectionWorksDetail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getCollectionWorksDetailParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultCollectionWorksDetailVo>(
    `/media/collection/getCollectionWorksDetail`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  )
}

/** 此处后端没有提供注释 POST /collection/updateCollection */
export async function updateCollection(
  body: MediaService.BizCollection,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultBizCollection>(`/media/collection/updateCollection`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
